package com.centaline.androidsalesblog.model.databaseobject;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import org.litepal.crud.DataSupport;

import java.util.ArrayList;

/**
 * 租售
 * Created by guilin on 16/1/26.
 */
public class PostDo extends DataSupport implements Parcelable {

    private String cityCode;
    private String Title;
    private String CnEstate;
    private int BedroomCount;
    private int SittingRoomCount;
    private int ToiletCount;
    private double Size;
    private String ThumbPath;
    private double Price;
    private double Rental;
    private String PostType;
    private String CAddress2;
    @SerializedName("Id")
    private String postId;
    private String CestCode;
    private double Lng;
    private double Lat;
    private String PropertyType;
    private ArrayList<String> KeyWords;
    private String keyWordsString;
    @SerializedName("IsOnline")
    private boolean Online;
    private String FitMent;
    private String Direction;
    private String Region;
    private String Gscope;
    private int RailWayDistance;
    private String RailWayName;
    private String RailLineNames;
    @SerializedName("IsDeal")
    private boolean deal;
    @SerializedName("TencentVistaUrl")
    private String tencentVistaUrl;

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getTitle() {
        return Title;
    }

    public void setTitle(String title) {
        Title = title;
    }

    public String getCnEstate() {
        return CnEstate;
    }

    public void setCnEstate(String cnEstate) {
        CnEstate = cnEstate;
    }

    public int getBedroomCount() {
        return BedroomCount;
    }

    public void setBedroomCount(int bedroomCount) {
        BedroomCount = bedroomCount;
    }

    public int getSittingRoomCount() {
        return SittingRoomCount;
    }

    public void setSittingRoomCount(int sittingRoomCount) {
        SittingRoomCount = sittingRoomCount;
    }

    public int getToiletCount() {
        return ToiletCount;
    }

    public void setToiletCount(int toiletCount) {
        ToiletCount = toiletCount;
    }

    public double getSize() {
        return Size;
    }

    public void setSize(double size) {
        Size = size;
    }

    public String getThumbPath() {
        return ThumbPath;
    }

    public void setThumbPath(String thumbPath) {
        ThumbPath = thumbPath;
    }

    public double getPrice() {
        return Price;
    }

    public void setPrice(double price) {
        Price = price;
    }

    public double getRental() {
        return Rental;
    }

    public void setRental(double rental) {
        Rental = rental;
    }

    public String getPostType() {
        return PostType;
    }

    public void setPostType(String postType) {
        PostType = postType;
    }

    public String getCAddress2() {
        return CAddress2;
    }

    public void setCAddress2(String CAddress2) {
        this.CAddress2 = CAddress2;
    }

    public String getPostId() {
        return postId;
    }

    public void setPostId(String postId) {
        this.postId = postId;
    }

    public String getCestCode() {
        return CestCode;
    }

    public void setCestCode(String cestCode) {
        CestCode = cestCode;
    }

    public double getLng() {
        return Lng;
    }

    public void setLng(double lng) {
        Lng = lng;
    }

    public double getLat() {
        return Lat;
    }

    public void setLat(double lat) {
        Lat = lat;
    }

    public String getPropertyType() {
        return PropertyType;
    }

    public void setPropertyType(String propertyType) {
        PropertyType = propertyType;
    }

    public ArrayList<String> getKeyWords() {
        return KeyWords;
    }

    public void setKeyWords(ArrayList<String> keyWords) {
        KeyWords = keyWords;
    }

    public String getKeyWordsString() {
        return keyWordsString;
    }

    public void setKeyWordsString(String keyWordsString) {
        this.keyWordsString = keyWordsString;
    }

    public boolean isOnline() {
        return Online;
    }

    public void setOnline(boolean online) {
        Online = online;
    }

    public String getFitMent() {
        return FitMent;
    }

    public void setFitMent(String fitMent) {
        FitMent = fitMent;
    }

    public String getDirection() {
        return Direction;
    }

    public void setDirection(String direction) {
        Direction = direction;
    }

    public String getRegion() {
        return Region;
    }

    public void setRegion(String region) {
        Region = region;
    }

    public String getGscope() {
        return Gscope;
    }

    public void setGscope(String gscope) {
        Gscope = gscope;
    }

    public int getRailWayDistance() {
        return RailWayDistance;
    }

    public void setRailWayDistance(int railWayDistance) {
        RailWayDistance = railWayDistance;
    }

    public String getRailWayName() {
        return RailWayName;
    }

    public void setRailWayName(String railWayName) {
        RailWayName = railWayName;
    }

    public String getRailLineNames() {
        return RailLineNames;
    }

    public void setRailLineNames(String railLineNames) {
        RailLineNames = railLineNames;
    }

    public boolean isDeal() {
        return deal;
    }

    public void setDeal(boolean deal) {
        this.deal = deal;
    }

    public String getTencentVistaUrl() {
        return tencentVistaUrl;
    }

    public void setTencentVistaUrl(String tencentVistaUrl) {
        this.tencentVistaUrl = tencentVistaUrl;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.cityCode);
        dest.writeString(this.Title);
        dest.writeString(this.CnEstate);
        dest.writeInt(this.BedroomCount);
        dest.writeInt(this.SittingRoomCount);
        dest.writeInt(this.ToiletCount);
        dest.writeDouble(this.Size);
        dest.writeString(this.ThumbPath);
        dest.writeDouble(this.Price);
        dest.writeDouble(this.Rental);
        dest.writeString(this.PostType);
        dest.writeString(this.CAddress2);
        dest.writeString(this.postId);
        dest.writeString(this.CestCode);
        dest.writeDouble(this.Lng);
        dest.writeDouble(this.Lat);
        dest.writeString(this.PropertyType);
        dest.writeStringList(this.KeyWords);
        dest.writeString(this.keyWordsString);
        dest.writeByte(Online ? (byte) 1 : (byte) 0);
        dest.writeString(this.FitMent);
        dest.writeString(this.Direction);
        dest.writeString(this.Region);
        dest.writeString(this.Gscope);
        dest.writeInt(this.RailWayDistance);
        dest.writeString(this.RailWayName);
        dest.writeString(this.RailLineNames);
        dest.writeByte(deal ? (byte) 1 : (byte) 0);
        dest.writeString(this.tencentVistaUrl);
    }

    public PostDo() {
    }

    protected PostDo(Parcel in) {
        this.cityCode = in.readString();
        this.Title = in.readString();
        this.CnEstate = in.readString();
        this.BedroomCount = in.readInt();
        this.SittingRoomCount = in.readInt();
        this.ToiletCount = in.readInt();
        this.Size = in.readDouble();
        this.ThumbPath = in.readString();
        this.Price = in.readDouble();
        this.Rental = in.readDouble();
        this.PostType = in.readString();
        this.CAddress2 = in.readString();
        this.postId = in.readString();
        this.CestCode = in.readString();
        this.Lng = in.readDouble();
        this.Lat = in.readDouble();
        this.PropertyType = in.readString();
        this.KeyWords = in.createStringArrayList();
        this.keyWordsString = in.readString();
        this.Online = in.readByte() != 0;
        this.FitMent = in.readString();
        this.Direction = in.readString();
        this.Region = in.readString();
        this.Gscope = in.readString();
        this.RailWayDistance = in.readInt();
        this.RailWayName = in.readString();
        this.RailLineNames = in.readString();
        this.deal = in.readByte() != 0;
        this.tencentVistaUrl = in.readString();
    }

    public static final Parcelable.Creator<PostDo> CREATOR = new Parcelable.Creator<PostDo>() {
        @Override
        public PostDo createFromParcel(Parcel source) {
            return new PostDo(source);
        }

        @Override
        public PostDo[] newArray(int size) {
            return new PostDo[size];
        }
    };
}
